Hardware Transactional Memory (HTM) is a mechanism in computer architecture for supporting parallel programming. With HTM, programmers may declare a group of instructions as a transaction and the HTM system guarantees that the instructions in the transaction are executed in an atomic and isolated way. Atomicity means that all the instructions of the transaction are executed as a single atomic block with respect to all other concurrent threads. Isolation means that no intermediate result of the transaction is exposed to the rest of the system until the transaction completes. HTM systems may allow transactions to run in parallel as long as they do not conflict. Two transactions may conflict when they both access the same memory area and either of the two transactions writes to that memory area.
Handling transaction conflicts often includes notifying the currently running application of the transaction conflict using a synchronous notification or an asynchronous notification. A synchronous notification may include notifying the application of the transaction conflict by diverting a control flow of the transaction to an abort handler that may cause the transaction to abort and restart. By contrast, an asynchronous notification often requires the application to proactively query transaction conflict information without prior notification.
Unfortunately, synchronous notifications and asynchronous notifications fail to provide adequate solutions to notifying an application of a transaction conflict. For example, some applications may be adversely affected by the abrupt nature with which synchronous notification diverts control flows, aborts transactions, and restarts transactions. Also, the information queries required by asynchronous notification can be a significant source of unwanted overhead in a transactional memory system.